<?php
use think\Route;
// 注册路由到index模块的 index 控制器的 category 操作
Route::rule('list/:id','index/category');
Route::rule('article/:id','index/article');

Route::rule('login','index/login/index');       //登录
Route::rule('register','index/login/register'); //注册
Route::rule('code','index/login/code');         //短信验证码

Route::rule('user','index/user/index');         //用户中心
Route::rule('sign','index/user/sign');          //签到
Route::rule('toLottery','index/user/toLottery');//抽奖
Route::rule('gift','index/user/gift');          //抽到的奖品
Route::rule('bind','index/user/bind');          //绑定支付宝
Route::rule('referee','index/user/referee');    //推荐人绑定

Route::rule('recharge','index/user/recharge');  //充值
Route::rule('cash','index/user/cash');          //提现

return [
    '__pattern__' => [
        'name' => '\w+',
    ],
    '[hello]'     => [
        ':id'   => ['index/hello', ['method' => 'get'], ['id' => '\d+']],
        ':name' => ['index/hello', ['method' => 'post']],
    ],

];
